<template>
  <div>
    <my-header></my-header>
    <div class="article_list">
      <ul>
        <li v-for="i in list" :key="i.create_at">
          <time v-text="$utils.goodTime(i.create_at)"></time>
          <router-link :to="'/content/' + i.id">
            {{i.title}}
          </router-link>
        </li>
      </ul>
    </div>
  <my-footer></my-footer>
  </div>
</template>
<script>
import myHeader from '@/components/header.vue'
import myFooter from '@/components/footer.vue'
export default {
  components:{
    myHeader,myFooter
  },
  data(){
    return {
      list:[]
    }
  },
  created () {
    this.getData()
  },
  methods:{
    getData(){
      this.$api.get('topics',null,r=>{
        this.list = r.data
      })
    }
  }
}
</script>
<style scoped>

</style>
